from tornado.ioloop import IOLoop;
from tornado.web import RequestHandler, Application;
import time;

class MainHandler(RequestHandler):
    def get(self):
        self.write("Hello Get, World ! " + self.timestamp());
        
    def post(self):
        self.write("Hello Post, World! " + self.timestamp());
        
    def timestamp(self):
        return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()));
        
def startup():
    context = Application([(r"/", MainHandler)]);
    context.listen(8888);
    print "webApp initialization";
    IOLoop.instance().start();

startup()